package cn.newtouch.pet.domain;

import cn.newtouch.basic.domain.BaseDomain;
import cn.newtouch.org.domain.Shop;
import cn.newtouch.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 实体类：宠物
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Pet extends BaseDomain {

    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;

    private Long type_id;
    private PetType type;
    //子集宠物类型
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    List<Pet> children = new ArrayList<>();

    private String resources;
    // 0 表示下架
    private Integer state=0;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createtime=new Date();

    private Long shop_id;
    private Shop shop;

    private Long user_id;
    private User user;

    private Long search_master_msg_id;

    //接收对象详细信息
    private PetDetail petDetail;


}
